//
//  MenuViewController.h
//  PriceOnline
//
//  Created by Le Anh Tai on 8/13/14.
//  Copyright (c) 2014 Le Anh Tai. All rights reserved.
//

#import "BaseViewController.h"
#import <MessageUI/MessageUI.h>

#define DONE_TEXT @"DONE"
#define EDIT_TEXT @"EDIT"
#define CANCEL_TEXT @"CANCEL"
#define SEARCH_TEXT @"Search Website"
#define TITLE_MENU @"News Ca"
#define FAVOURITE_TEXT @"Favourite sites"
#define OTHER_TEXT @"Others"

@class SelectWebsiteController;
@protocol MenuViewControllerDelegate;
@interface MenuViewController : BaseViewController<UITableViewDataSource, UITableViewDelegate, MFMailComposeViewControllerDelegate, UISearchBarDelegate,UIGestureRecognizerDelegate>
{
    UITableView *_tableView;
    UILabel *_titleLabel;
    UIView *_lineView;
    UIView *_lineRightView;
    UIButton *_rightButton;
    UIButton *_leftButton;
    UIView *_alphaView;
    NSMutableArray *_favouriteWebsites;
    NSMutableArray *_otherWebsites;
    NSMutableArray *_originalFavouriteWebsites;
    NSMutableArray *_originalOtherWebsites;
    NSArray *_sections;
    
    NSManagedObject *_markedWebsite;
    NSManagedObject *_selectedWebsiteData;
    
    UISearchBar *_searchBar;    
}

@property (nonatomic, weak) id<MenuViewControllerDelegate> delegateMenu;

- (void)animateOut;
- (void)animateInAndHide;

- (void)prepareData;
- (void)initializeLeftButton;
- (void)initializeRightButton;

@end

@protocol MenuViewControllerDelegate <NSObject>

- (void)menuController:(MenuViewController *)controller didSelectWebsite:(NSManagedObject *)website;
- (void)menuControllerWillHide:(MenuViewController *)controller;
- (void)menuControllerWillShow:(MenuViewController *)controller;

@end